# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=grilo
pkgver=0.3.4
pkgrel=1
pkgdesc="Framework that provides access to various sources of multimedia content"
url="https://wiki.gnome.org/Projects/Grilo"
arch=(i686 x86_64)
license=(LGPL)
depends=(gtk3 libxml2 libsoup liboauth totem-plparser)
makedepends=(gobject-introspection gtk-doc vala git meson)
optdepends=('grilo-plugins: Plugins for grilo')
_commit=b773deccb84c159850cdcf73db0d8e8707f9da09  # tags/grilo-0.3.4^0
source=("git+https://git.gnome.org/browse/grilo#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^grilo-//;s/-/+/g'
}

prepare() {
  mkdir build
}

build() {
  cd build
  export LANG=en_US.UTF-8
  meson --prefix=/usr --buildtype=plain -Denable-gtk-doc=true ../$pkgname
  ninja
}

check() {
  cd build
  ninja test
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
